package com.isdust.jy.mbank.activity;

import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.isdust.jy.mbank.MainActivity;
import com.isdust.jy.mbank.R;
import com.isdust.jy.mbank.base.BaseActivity;
import com.isdust.jy.mbank.view.spinner;

/**
 * Created by zeroworld on 2016/10/17.
 */

public class Initial extends BaseActivity{
    private Button btn_login;
    private Button btn_reg;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        initData();
        setContentView(R.layout.activity_initial);
        //界面跳转
        init();
    }


    private void init(){
        btn_login = (Button) findViewById(R.id.initial_log);
        btn_reg = (Button) findViewById(R.id.initial_reg);
        btn_login.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(Initial.this,LoginActivity.class);
                startActivity(intent);
                //finish();        //把当前页面关掉
            }

        });
        btn_reg.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(Initial.this,Index.class);
                startActivity(intent);
            }
        });
    }
    protected void initData() {
        Bitmap bitmap = BitmapFactory.decodeResource(getResources(),R.drawable.sp);
        spinner.drawables.add(bitmap);
        spinner.drawables.add(bitmap);
        spinner.drawables.add(bitmap);
        spinner.drawables.add(bitmap);
    }

}
